<template>
	<view class="contation">
		<view class="bg_header"></view>
		<view class="team_inxi">
			<view class="flex list">
				<view class="flex-1">
					<view class="">{{dataInfo.plot}}</view>
					<view class="">小区业绩</view>
					
				</view>
				<view class="flex-1">
					<view class="">{{dataInfo.region}}</view>
					<view class="">大区业绩</view>
					
				</view>
			</view>
		</view>
		<view class="team_biao">
			<image src="../../static/team_biao.png" mode=""></image>
		</view>
		<view class="team_list">
			<view class="list flex flex-align" v-for="(item,index) in datalist" :key="index" v-if="datalist.length!=0">
				<view class="left">
					<image :src="item.headimg" mode=""></image>
				</view>
				<view class="right" style="width: 100%;">
					<view class="name flex flex-align flex-bt">
						<view class="bold">{{item.inviter_code}}</view> <view class="" style="color: #999;">{{item.create_at}}</view>
					</view>
					<view class="zhitui flex flex-align flex-bt">
						<view class="left">直推人数{{item.team_count}}人</view>
						<view class="right">团队业绩 : {{item.team_plot||0.00}}</view>
					</view>
				</view>
			</view>
			<view class="empty-box" style="padding-top: 200rpx" v-if="datalist.length==0" >
				<image src="../../static/ic_nodata.png" mode=""></image>
				<view class="">暂无数据</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		
		data() {
			return {
				title: 'Hello',
				dataInfo:'',
				datalist:[],
				page:1
			}
		},
		
		onLoad() {
			this.getList()
		},
		onReachBottom() {
			this.page++
			this.getList()
		},
		methods: {
			getList(){
				let that = this
				that.tui.request("api.auth.center/team", "POST", {page:that.page}, false, false, true).then((res) => {
					if(res.code==1){
						that.dataInfo = res.data.info
						that.datalist =that.datalist.concat(res.data.list) 
					}
				}).catch((res) => {
					
				})
			},
			go_url(e){
				this.tui.href('/pages/user/zhitui_list?id='+e)
			}
		}
	}
</script>

<style lang="scss">
	page{background: #f1f1f1;}
	.bg_header{height: 288rpx;background: url('/static/ic_team_bg.png') no-repeat;background-size: 100% 100%;}
	.team_inxi{
		margin: -100rpx 30rpx 30rpx;padding: 30rpx;background: #feebc3;border-radius:20rpx;
		.name{margin-bottom: 20rpx;
			.header{width: 120rpx;height: 120rpx;border-radius: 100%;margin-right: 20rpx;}
			.level{color: #b98144;font-size: 30rpx;
				image{width: 50rpx;height: 25rpx;margin-left: 10rpx;}
			}
		}
		.list{line-height: 2.4;text-align: center;color: #573d1a;}
	}
	.team_biao{text-align: center;
		image{width: 600rpx;height: 97rpx;}
	}
	.team_list{margin: 30rpx;
		.list{
			padding: 30rpx;box-shadow: 0px 1px 5px 1px #eee;background: #fff;border-radius: 20rpx;margin-bottom: 20rpx;
			.left{
				image{width: 100rpx;height: 100rpx;border-radius: 100%;margin-right: 20rpx;}
			}
			.right{
				.name{margin-bottom: 20rpx;}
				.zhitui{color: #999;font-size: 24rpx;}
			}
		}
	}
</style>